package cn.wenhaha.lazy;

/**
 * @ClassName: LazyOne
 * @description: TODO 第一种方式的懒加载
 * @author: wyndem
 * @date: 2019/5/13 12:27
 * @Version: 1.0
 **/
public class LazyOne {


    private static LazyOne lazyOne;


    private LazyOne() {}

    /**
     * description: 这种是最简单最快速的懒加载单例模式，但不是线程安全的
     * @Author wyndem
     * @Date 2019/5/13 12:33
     * @Param []
     * @return cn.wenhaha.lazy.LazyOne
     **/
    public  static  LazyOne getInstance(){
        if (lazyOne==null){
            lazyOne=new LazyOne();
        }
        return lazyOne;
    }


}
